package com.atguigu.gulimall.cart.config;

import com.atguigu.gulimall.cart.inteceptor.CartInteceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @version 1.0
 * @Author yanjingren
 * @Date 2021/6/28
 * @Description com.atguigu.gulimall.cart.config
 */
@Configuration
public class GulimallWebConfig implements WebMvcConfigurer {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new CartInteceptor()).addPathPatterns("/**");
    }

}
